	function setCookie(name,data,day=7){
		var date  = new Date();
		if(typeof data == "object"){
			data = JSON.stringify(data);
		}
		date.setDate(date.getDate()+day)
		document.cookie = name + "="+ data + ";expires="+date+";path=/";
	}
	
	function getCookie(name){
		var cookie = document.cookie;
		var value = document.cookie.split("=")[1].trim();
		return value;
	}
